from django.urls import path

from apps.article.views import ChannelsListView, ArticleViewSet, SearchView

urlpatterns = [
    # 频道列表
    path('channels/',ChannelsListView.as_view()),
    # 关键字搜索
    path('articles/search/',SearchView.as_view({'get':'list'})),

]

from rest_framework import routers
# 文章url
router = routers.SimpleRouter()
router.register('article',ArticleViewSet,basename='article')
urlpatterns += router.urls